Optimal. Leaf size=92 \[ x \left (a+b \sec ^{-1}(c x)\right )^2+\frac {4 i b \left (a+b \sec ^{-1}(c x)\right ) \text {ArcTan}\left (e^{i \sec ^{-1}(c x)}\right )}{c}-\frac {2 i b^2 \text {PolyLog}\left (2,-i e^{i \sec ^{-1}(c x)}\right )}{c}+\frac {2 i b^2 \text {PolyLog}\left (2,i e^{i \sec ^{-1}(c x)}\right )}{c} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 92, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 5, integrand size = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {5324, 4494,
4266, 2317, 2438} \begin {gather*} \frac {4 i b \text {ArcTan}\left (e^{i \sec ^{-1}(c x)}\right ) \left (a+b \sec ^{-1}(c x)\right )}{c}+x \left (a+b \sec ^{-1}(c x)\right )^2-\frac {2 i b^2 \text {Li}_2\left (-i e^{i \sec ^{-1}(c x)}\right )}{c}+\frac {2 i b^2 \text {Li}_2\left (i e^{i \sec ^{-1}(c x)}\right )}{c} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2317
Rule 2438
Rule 4266
Rule 4494
Rule 5324
Rubi steps
\begin {align*} \int \left (a+b \sec ^{-1}(c x)\right )^2 \, dx &=\frac {\text {Subst}\left (\int (a+b x)^2 \sec (x) \tan (x) \, dx,x,\sec ^{-1}(c x)\right )}{c}\\ &=x \left (a+b \sec ^{-1}(c x)\right )^2-\frac {(2 b) \text {Subst}\left (\int (a+b x) \sec (x) \, dx,x,\sec ^{-1}(c x)\right )}{c}\\ &=x \left (a+b \sec ^{-1}(c x)\right )^2+\frac {4 i b \left (a+b \sec ^{-1}(c x)\right ) \tan ^{-1}\left (e^{i \sec ^{-1}(c x)}\right )}{c}+\frac {\left (2 b^2\right ) \text {Subst}\left (\int \log \left (1-i e^{i x}\right ) \, dx,x,\sec ^{-1}(c x)\right )}{c}-\frac {\left (2 b^2\right ) \text {Subst}\left (\int \log \left (1+i e^{i x}\right ) \, dx,x,\sec ^{-1}(c x)\right )}{c}\\ &=x \left (a+b \sec ^{-1}(c x)\right )^2+\frac {4 i b \left (a+b \sec ^{-1}(c x)\right ) \tan ^{-1}\left (e^{i \sec ^{-1}(c x)}\right )}{c}-\frac {\left (2 i b^2\right ) \text {Subst}\left (\int \frac {\log (1-i x)}{x} \, dx,x,e^{i \sec ^{-1}(c x)}\right )}{c}+\frac {\left (2 i b^2\right ) \text {Subst}\left (\int \frac {\log (1+i x)}{x} \, dx,x,e^{i \sec ^{-1}(c x)}\right )}{c}\\ &=x \left (a+b \sec ^{-1}(c x)\right )^2+\frac {4 i b \left (a+b \sec ^{-1}(c x)\right ) \tan ^{-1}\left (e^{i \sec ^{-1}(c x)}\right )}{c}-\frac {2 i b^2 \text {Li}_2\left (-i e^{i \sec ^{-1}(c x)}\right )}{c}+\frac {2 i b^2 \text {Li}_2\left (i e^{i \sec ^{-1}(c x)}\right )}{c}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.12, size = 163, normalized size = 1.77 \begin {gather*} \frac {a^2 c x+2 a b \left (c x \sec ^{-1}(c x)+\log \left (\cos \left (\frac {1}{2} \sec ^{-1}(c x)\right )-\sin \left (\frac {1}{2} \sec ^{-1}(c x)\right )\right )-\log \left (\cos \left (\frac {1}{2} \sec ^{-1}(c x)\right )+\sin \left (\frac {1}{2} \sec ^{-1}(c x)\right )\right )\right )+b^2 \left (\sec ^{-1}(c x) \left (c x \sec ^{-1}(c x)-2 \log \left (1-i e^{i \sec ^{-1}(c x)}\right )+2 \log \left (1+i e^{i \sec ^{-1}(c x)}\right )\right )-2 i \text {PolyLog}\left (2,-i e^{i \sec ^{-1}(c x)}\right )+2 i \text {PolyLog}\left (2,i e^{i \sec ^{-1}(c x)}\right )\right )}{c} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.18, size = 204, normalized size = 2.22
method | result | size |
derivativedivides | \(\frac {a^{2} c x +\mathrm {arcsec}\left (c x \right )^{2} b^{2} c x -2 b^{2} \mathrm {arcsec}\left (c x \right ) \ln \left (1-i \left (\frac {1}{c x}+i \sqrt {1-\frac {1}{c^{2} x^{2}}}\right )\right )+2 b^{2} \mathrm {arcsec}\left (c x \right ) \ln \left (1+i \left (\frac {1}{c x}+i \sqrt {1-\frac {1}{c^{2} x^{2}}}\right )\right )-2 i b^{2} \dilog \left (1+i \left (\frac {1}{c x}+i \sqrt {1-\frac {1}{c^{2} x^{2}}}\right )\right )+2 i b^{2} \dilog \left (1-i \left (\frac {1}{c x}+i \sqrt {1-\frac {1}{c^{2} x^{2}}}\right )\right )+2 \,\mathrm {arcsec}\left (c x \right ) a b c x -2 \ln \left (c x +c x \sqrt {1-\frac {1}{c^{2} x^{2}}}\right ) a b}{c}\) | \(204\) |
default | \(\frac {a^{2} c x +\mathrm {arcsec}\left (c x \right )^{2} b^{2} c x -2 b^{2} \mathrm {arcsec}\left (c x \right ) \ln \left (1-i \left (\frac {1}{c x}+i \sqrt {1-\frac {1}{c^{2} x^{2}}}\right )\right )+2 b^{2} \mathrm {arcsec}\left (c x \right ) \ln \left (1+i \left (\frac {1}{c x}+i \sqrt {1-\frac {1}{c^{2} x^{2}}}\right )\right )-2 i b^{2} \dilog \left (1+i \left (\frac {1}{c x}+i \sqrt {1-\frac {1}{c^{2} x^{2}}}\right )\right )+2 i b^{2} \dilog \left (1-i \left (\frac {1}{c x}+i \sqrt {1-\frac {1}{c^{2} x^{2}}}\right )\right )+2 \,\mathrm {arcsec}\left (c x \right ) a b c x -2 \ln \left (c x +c x \sqrt {1-\frac {1}{c^{2} x^{2}}}\right ) a b}{c}\) | \(204\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a + b \operatorname {asec}{\left (c x \right )}\right )^{2}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int {\left (a+b\,\mathrm {acos}\left (\frac {1}{c\,x}\right )\right )}^2 \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________